<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title data-lang="StreamCompositor">Stream Compositor</title>
  <link rel="icon" href="../../../../favicon.ico" type="image/x-icon" />
  <link rel="stylesheet" href="../../../assets/css/bootstrap.min.css">
  <link rel="stylesheet" href="../../../assets/css/style.css">
  <link rel="stylesheet" href="./index.css">
  <script src="../../../assets/js/express_sdk/stream-compositor.js"></script>
  <script src="../../../assets/js/express_sdk/background-process.js"></script>
  <script src="../../../assets/js/express_sdk/ZegoExpressWebRTC.js"></script>
</head>

<body class="fix-sidebar card-no-border">
  <div class="preloader">
    <svg class="circular" viewBox="25 25 50 50">
      <circle class="path" cx="50" cy="50" r="20" fill="none" stroke-width="2" stroke-miterlimit="10" />
    </svg>
  </div>

  <div class="container main-wrapper">
    <div class="page-wrapper">
      <div class="container-fluid">
        <div class="row">
          <div class="col-12 login-wrapper">
            <h6 data-lang="Preconditions">前置条件</h6>
            <div class="login-desc" data-lang="PreconditionsDesc">
              体验该功能，需要模拟一个用户（UserID）登陆到对应的房间（RoomID）中，并且有权限（Token）时才可以登陆成功。
            </div>
            <div class="form-wrap font-14 row">
              <div class="form-item col-12 col-lg-4">
                <span>RoomID</span>
                <div class="icon-question">?
                  <div class="pop-box" data-lang="RoomIDDesc">Tooltip text</div>
                </div>
                <input type="text" id="RoomID" />
              </div>
              <div class="form-item col-12 col-lg-4">
                <span>UserID</span>
                <div class="icon-question">?
                  <div class="pop-box">
                    <span data-lang="UserIDDesc"></span>
                  </div>
                </div>
                <input type="text" id="UserID" />
              </div>
              <div class="form-item col-12 col-lg-4">
                <span>Token</span>
                <div class="icon-question">?
                  <div class="pop-box">
                    <span data-lang="TokenDesc"></span>
                    <a href="https://console.zego.im" data-lang="ApplyToken" target="_blank"></a>
                  </div>
                </div>
                <input type="text" class="w-70" id="Token" />
              </div>
              <div class="form-item col-12 col-lg-4">
                <span>PublishID</span>
                <div class="icon-question">?
                  <div class="pop-box">
                    <span data-lang="TokenDesc"></span>
                    <a href="https://console.zego.im" data-lang="ApplyToken" target="_blank"></a>
                  </div>
                </div>
                <input type="text" class="w-70" id="PublishID" />
              </div>
              <div class="form-item col-12 col-lg-4">
                <span>PlayID</span>
                <div class="icon-question">?
                  <div class="pop-box">
                    <span data-lang="TokenDesc"></span>
                    <a href="https://console.zego.im" data-lang="ApplyToken" target="_blank"></a>
                  </div>
                </div>
                <input type="text" class="w-70" id="PlayID" />
              </div>
            </div>
            <div style="display: flex;">
              <button id="LoginRoom" class="play-pause-button" title="loginRoom()" style="width: 120px;">
                <div class="success-svg m-r-5" id="loginSuccessSvg" style="display: none;">
                  <svg class="ft-green-tick" xmlns="http://www.w3.org/2000/svg" height="15" width="15"
                    viewBox="0 0 48 48" aria-hidden="true">
                    <circle class="circle" fill="#5bb543" cx="24" cy="24" r="22" />
                    <path class="tick" fill="none" stroke="#FFF" stroke-width="6" stroke-linecap="round"
                      stroke-linejoin="round" stroke-miterlimit="10" d="M14 27l5.917 4.917L34 17" />
                  </svg>
                </div>
                Login Room
              </button>
              <button id="startPublishing" class="play-pause-button" title="startPublishing()" style="width: 180px;">
                <div class="success-svg m-r-5" id="loginSuccessSvg" style="display: none;">
                  <svg class="ft-green-tick" xmlns="http://www.w3.org/2000/svg" height="15" width="15"
                    viewBox="0 0 48 48" aria-hidden="true">
                    <circle class="circle" fill="#5bb543" cx="24" cy="24" r="22" />
                    <path class="tick" fill="none" stroke="#FFF" stroke-width="6" stroke-linecap="round"
                      stroke-linejoin="round" stroke-miterlimit="10" d="M14 27l5.917 4.917L34 17" />
                  </svg>
                </div>
                Publishing Stream
              </button>
              <button id="startPlaying" class="play-pause-button" title="startPlaying()" style="width: 180px;">
                <div class="success-svg m-r-5" id="loginSuccessSvg" style="display: none;">
                  <svg class="ft-green-tick" xmlns="http://www.w3.org/2000/svg" height="15" width="15"
                    viewBox="0 0 48 48" aria-hidden="true">
                    <circle class="circle" fill="#5bb543" cx="24" cy="24" r="22" />
                    <path class="tick" fill="none" stroke="#FFF" stroke-width="6" stroke-linecap="round"
                      stroke-linejoin="round" stroke-miterlimit="10" d="M14 27l5.917 4.917L34 17" />
                  </svg>
                </div>
                Playing Stream
              </button>
            </div>

          </div>
        </div>
        <div class="row">
          <div class="col-12 preview-wrapper">
            <div class="preview-roomInfo">
              RoomID:&nbsp;<div id="roomInfo-id" class="m-r-10"></div>
              RoomState:&nbsp;<div id="roomInfo-state">
                <div class="success-svg" id="roomStateSuccessSvg" style="display: none;">
                  <svg class="ft-green-tick" xmlns="http://www.w3.org/2000/svg" height="10" width="10"
                    viewBox="0 0 48 48" aria-hidden="true">
                    <circle class="circle" fill="#5bb543" cx="24" cy="24" r="22" />
                  </svg>
                </div>
                <div class="error-svg" id="roomStateErrorSvg" style="display: inline-block;">
                  <svg class="ft-green-tick" xmlns="http://www.w3.org/2000/svg" height="10" width="10"
                    viewBox="0 0 48 48" aria-hidden="true">
                    <circle class="circle" fill="#5bb543" cx="24" cy="24" r="22" />
                  </svg>
                </div>
              </div>
            </div>
            <div class="compositor-options">
              <!-- <div class="font-bold m-b-5" data-lang="BackgroundEffectMode">设置背景处理方式</div>
              <div class="switch-field">
                <input type="radio" id="b-radio-one" name="bg-mode" value="none"  />
                <label for="b-radio-one" data-lang="None">无</label>
                <input type="radio" id="b-radio-two" name="bg-mode" value="blur" checked/>
                <label for="b-radio-two" data-lang="Blur">背景虚化</label>
                <input type="radio" id="b-radio-three" name="bg-mode" value="virtual" />
                <label for="b-radio-three" data-lang="Virtual">虚拟背景</label>
              </div>
              -->
              <div class="font-bold m-b-5" data-lang="SetCompositorImage">选择图片</div>

              <div class="m-t-5">
                <input type="file" class="" accept="image*" id="inputImg1" style="display: none;" />
                <label id="selectImg1" class="select-btn">选择图片1</label>
                <input type="file" class="" accept="image*" id="inputImg2" style="display: none;" />
                <label id="selectImg2" class="select-btn">选择图片2</label>
              </div>
              <div style="display: flex;">
                <img src="./test.jpg" id="compositorImg1" crossorigin="anonymous" class="compositor-img"></img>
                <img src="./test.jpg" id="compositorImg2" crossorigin="anonymous" class="compositor-img"></img>
              </div>
              <div class="switch-field m-t-5">
                <button type="button" id="setTransparentEffect" class="btn btn-info btn-sm set-transparent"
                  data-lang="setTransparentEffect" title="setTransparentEffect">设置人像背景透明</button>
              </div>
            </div>
            <div class="videoList" id="videoList">

              <div class="pushlishInfo-title">
                <span data-lang="Preview">Preview</span>&emsp;Publish StreamID: <span id="pushlishInfo-id"></span>
              </div>

              <div class="preview-content">
                <div id="mixVideo"></div>

              </div>

              <div class="pushlishInfo-title">
                <span data-lang="PlayStream">Play Stream</span>&emsp;StreamID: <span id="playInfo-id"></span>
              </div>
              <div class="preview-content">
                <div id="remoteVideo"></div>
              </div>
            </div>

          </div>


        </div>
      </div>
      <ul class="goToDoc">
        <li>
          <span data-lang="HelpDocsVideoCodec"> Web 端视频编码默认使用 VP8。如果需要体验和其他端互通或者转推 CDN 功能，请在调试与配置页面修改为 H.264。</span>
          &nbsp;
          <a href="../../DebugAndConfig/LogAndVersionAndDebug/index.html" data-lang="HelpSettingsPage" target="_blank">
            点击修改 </a>
        </li>
        <li>
          <span data-lang="MoreDocs">更多文档，请跳转至即构 </span> &nbsp;
          <a href="https://doc-zh.zego.im/article/6301" data-lang="HelpDocs" target="_blank"> 帮助文档 </a>
        </li>
      </ul>
    </div>
  </div>
  
  </div>

  </div>

  </div>

  <script src="../../../assets/js/left-menu.js"></script>
  <script src="../../../assets/js/jquery.min.js"></script>
  <script src="../../../assets/js/jquery.i18n.properties.min.js"></script>
  <script src="../../../assets/js/metisMenu.min.js"></script>
  <script src="../../../assets/js/jquery.slimscroll.min.js"></script>
  <script src="../../../assets/js/bootstrap.min.js"></script>
  <script src="../../../assets/js/vconsole.min.js"></script>
  <script src="../../../assets/js/custom.js"></script>
  <script src="../../../KeyCenter.js"></script>
  <script src="index.js"></script>
</body>

</html>